﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
namespace FSY.Core.UI
{
    public class BoxTitle:Literal
    {
        #region Private Properties
        private string _Title;
        #endregion

        #region Public Properties
        public string Title
        {
            get { return _Title; }
            set { _Title = value; }
        }
        #endregion


        protected override void Render(System.Web.UI.HtmlTextWriter writer)
        {
            if (this.Parent is Box)
            {
                Box box = (Box)this.Parent;
                if (box.Title == "")
                {
                    box.Title = this.Title;
                }
                writer.Write(box.Title);
            }            
            base.Render(writer);
        }
    }
}
